package com.mop.sg2.panel.view;

public enum ControlEnum {
	Button, Input, Image, Text;

	public static ControlEnum getInstance(String type) {
		if ("button".equals(type.toLowerCase())) {
			return Button;
		} else if ("input".equals(type.toLowerCase())) {
			return Input;
		} else if ("image".equals(type.toLowerCase())) {
			return Image;
		} else if ("text".equals(type.toLowerCase())) {
			return Text;
		} else {
			throw new IllegalArgumentException("UnKonw Control");
		}
	}
}
